home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / graphics / videoeasel / camrexx / isingi.rexx < prev    next >
OS/2 REXX Batch file  |  1999-04-19  |  520b  |  21 lines

  1. /* Microcannonical Ising Model, by an idea of Toffoli, in CAMRexx by THOR */
  2.  
  3. MakeAlgorithm:
  4.    PLANEALGORITHM neumann hvphases
  5. return
  6.  
  7. MakePlane:
  8.    lattice=(horz=vert)
  9.    if phase=1 then   lattice=~lattice
  10.    /* handle only even or odd sublattice */
  11.    if lattice then; do
  12.       sum=north+south+east+west
  13.       if sum=2 then  new=~center             /* flip spin if two nbrs. */
  14.       else           new=center              /* else preserve */
  15.       SETPLANE new
  16.    end; else; do;
  17.       SETPLANE center
  18.    end
  19. return
  20.  
  21.